﻿using MRGSP.SurveyMaster.Core.Model;
using MRGSP.SurveyMaster.Core.Service;
using MRGSP.SurveyMaster.Core.Service.Utils;

namespace MRGSP.SurveyMaster.Service.Utils
{
    public class TextBoxGenerator : IHtmlGenerator
    {
        public string Generate(Question question)
        {
            return string.Format("{2}<input type='text' name='q{0}' id='q{0}' value='{1}' />",
                                 question.Id,
                                 question.Value,
                                 question.BuildLabel())
                .Colorize(question);
        }
    }
}